import request from '@/common/request'

export function getList(params) {
  return request({
    url: '/apikanke/material/list',
    method: 'get',
    params,
  })
}

export function batchDelete(data) {
  return request({
    url: '/apikanke/material/delete',
    method: 'post',
    data,
  })
}

export function update(data) {
  return request({
    url: '/apikanke/material/update',
    method: 'post',
    data,
  })
}

export function fetchToken() {
  return request({
    url: '/apikanke/material/getSign',
    method: 'post',
  })
}

export function cosUpload(data) {
  return request({
    url: '/apikanke/material/cosUpload',
    method: 'post',
    data,
  })
}

export function upload(data) {
  return request({
    url: '/apikanke/material/add',
    method: 'post',
    data,
  })
}

export function getCosUrl(data) {
  return request({
    url: '/apikanke/upload/uploadCosUrl',
    method: 'post',
    data,
  })
}

export function updateMaterialUrl(data) {
  return request({
    url: '/apikanke/material/updateMaterialUrl',
    method: 'post',
    data,
  })
}
